package test;

import lights.adapters.Field;
import lights.dracots.Tuple;
import lights.interfaces.ITuple;
import sagroup.dracots.DracoTS;
import sagroup.dracots.DracoTuple;
import sagroup.dracots.FlatShareTuple;
import sagroup.dracots.TupleType;

public class OutAgent implements Runnable {
	@Override
	public void run() {
		DracoTS dts = DracoTS.get("testing");

		for (int i = 1; i < 10; i++) {
			ITuple it = new Tuple();
			it.add(new Field().setValue("Hello" + i));
			DracoTuple ret = dts.out(new FlatShareTuple(new TupleType("type"),
					it));
			if (ret != null) {
				System.out.println("OutAgent has out tuple with vid: "
						+ ret.getVID());
			}
		}
	}
}
